/*
	klib_keyboard_buffer.h

	provides headers for keyboard buffer functionality

	Author: Aidan Goddard 6/10/13
*/

#ifndef KEYBOARD_BUFFER_H_INCLUDED
#define KEYBOARD_BUFFER_H_INCLUDED

uint32_t __KLIB__KBBufferWrite(int count, uint64_t *in_buffer);
uint32_t __KLIB__KBBufferRead(int *count, uint64_t *out_buffer);
uint32_t __KLIB__KBRegisterDriver(void(*num_led)(int state), void(*cap_led)(int state), void(*scr_led)(int state), void(*reset)(void *params), uint32_t *ID);
uint32_t __KLIB__KBUnregisterDriver(uint32_t ID);
uint32_t __KLIB__KBReset(void *params);
uint32_t __KLIB__KBSetNumLED(int state);
uint32_t __KLIB__KBSetCapLED(int state);
uint32_t __KLIB__KBSetScrLED(int state);

#define KB_SUCCESS			0
#define KB_BUFFER_FULL		0xffffffff
#define KB_BUFFER_EMPTY		0xfffffffe
#define KB_BAD_STATE		0xfffffffd
#define KB_NO_FREE_DRIVER	0xfffffffc

#define KB_LED_STATE_ON		1
#define KB_LED_STATE_OFF	0

#endif
